package com.example.android.extensions

import kotlinx.coroutines.*
import okhttp3.Response

suspend fun Response.StringBody(): String {
    return withContext(Dispatchers.IO) {
        body!!.string()
    }
}

suspend fun Response.BytesBody(): ByteArray {
    return withContext(Dispatchers.IO) {
        body!!.bytes()
    }
}